package com.wzh.service;

import com.wzh.dao.Userdao;


import com.wzh.pojo.Po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class Userser {
	@Autowired
	private Userdao userdao;

	public List<User> get(){
		return userdao.getAll();
	};

	public  List<User> selectone(Long id){
		return userdao.getbyid(id);
	}

	public boolean update(User user){
		return userdao.updatbyid(user)>0;
	}

	public boolean delete(User user){
		return userdao.deonebyid(user)>0;
	}
	public boolean add(User user){
		return userdao.addnew(user)>0;
	}


}
